<script setup>
import { reactive, toRefs } from "vue";
// const user = reactive({ name: "tom", age: 18 });
// const {name, age} = toRefs(user)
const {name, age} = toRefs(reactive({ name: "tom", age: 18 }))
</script>

<template>
  <div>
    <p>姓名：{{ name }}</p>
    <p>年龄：{{ age }} <button @click="age++">一年又一年</button></p>
  </div>
</template>